package com.lsp.microorder.goods.controller;

import com.lsp.microcommon.common.CommonResult;
import com.lsp.microcommon.common.PageParam;
import com.lsp.microorder.goods.service.GoodsOrderService;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

@RestController
@RequestMapping("/app/order")
public class GoodsOrderController {

    @Resource
    private GoodsOrderService goodsOrderService;

    @PostMapping("/getOrderByState")
    public CommonResult goodsOrderPage(@RequestBody PageParam param){
        return CommonResult.success(goodsOrderService.pageOrder(param));
    }
}
